﻿forgetApp.factory("ForgetService", function ($http, $q) {
    return {
        sendLink: function (user) {
            var deferred = $q.defer();
            $http({ method: 'POST', url: '/ForgetPassword/Reset', data: user }).success(deferred.resolve).error(deferred.reject);
            return deferred.promise;
        },
        resetPassword: function (user) {
            var deferred = $q.defer();
            $http({ method: 'POST', url: '/Reset/NewPassword', data: user }).success(deferred.resolve).error(deferred.reject);
            return deferred.promise;
        }
    }
});